# This target is to ensure accidental execution of Makefile as a bash script 
# will not execute commands like rm in unexpected directories and exit gracefully.
.prevent_execution:
	exit 0

CC = g++

APP_NAME = InstEmu
BIN = bin/coremark.bin

#remove @ for no make command prints
DEBUG = @

SRC_FILES = $(shell find src/ -name '*.cpp')

MAKE_CMD = $(CC) -g $(SRC_FILES) -o $(APP_NAME) -I inc 
MAKE_CMD += -DDEBUG_INST

comp:
	$(DEBUG)$(MAKE_CMD)

run:comp
	$(DEBUG) ./$(APP_NAME) $(BIN)	
 

clean:
	rm -f $(APP_NAME)
